package org.etom.connector.datatypes;

import org.etom.connector.service.ConnectorException;

/**
 * Represents the user that is established the connection.
 */
public interface IMoodleUser {
  
  /**
   * The method returns the user identifier.
   * It is unique in the scope of the server.
   * 
   * @return user identifier
   */
  public Long getId();
  
  /**
   * The method returns the Moodle courses which are available for the user.
   * 
   * @return - user courses
   * 
   * @throws ConnectorException if communication error is occured
   */
  public IMoodleCourse[] getCourses() throws ConnectorException;
  
  /**
   * The method returns the connection which is the parent of the user.
   * 
   * @return - the user belongs to that connection.
   */
  public IMoodleConnection getConnection();
  
}
